package com.ruoyi.record.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 播放记录对象 play_record
 * 
 * @author ruoyi
 * @date 2025-10-10
 */
public class PlayRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 记录ID */
    private Long id;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 内容ID */
    @Excel(name = "内容ID")
    private Long contentId;

    /** 章节ID */
    @Excel(name = "章节ID")
    private Long chapterId;

    /** 播放进度（秒） */
    @Excel(name = "播放进度", readConverterExp = "秒=")
    private Long progress;

    /** 最后播放时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后播放时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastPlayTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setContentId(Long contentId) 
    {
        this.contentId = contentId;
    }

    public Long getContentId() 
    {
        return contentId;
    }

    public void setChapterId(Long chapterId) 
    {
        this.chapterId = chapterId;
    }

    public Long getChapterId() 
    {
        return chapterId;
    }

    public void setProgress(Long progress) 
    {
        this.progress = progress;
    }

    public Long getProgress() 
    {
        return progress;
    }

    public void setLastPlayTime(Date lastPlayTime) 
    {
        this.lastPlayTime = lastPlayTime;
    }

    public Date getLastPlayTime() 
    {
        return lastPlayTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("contentId", getContentId())
            .append("chapterId", getChapterId())
            .append("progress", getProgress())
            .append("lastPlayTime", getLastPlayTime())
            .append("createTime", getCreateTime())
            .toString();
    }
}
